package com.googlecode.skald.client.cmds;

import com.google.gwt.user.client.Command;

/**
 * Builds an instance of a particular Command type that will be executed 
 * when the associated affordance is selected.  
 * <p>
 * Affordance commands can also replicate themselves, producing another 
 * copy of the same command type but with different cmd text.
 * 
 * @author Zach Tomaszewski
 */
public interface AffordanceCommand extends Command{

  /** 
   * A factory method that returns a new AffordanceCommand of the same type
   * as this one that instead wraps the given cmdText. 
   */
  public AffordanceCommand build(String cmdText);
  
}
